<?php

include_once("pchart/class/pDraw.class.php");
include_once("pchart/class/pImage.class.php");
include_once("pchart/class/pData.class.php");
function draw($data){
    $mydata = new pData();
    $mydata->addPoints($data);
    $mypicture = new pImage(count($data),max($data),$mydata);
    $mypicture->setFontProperties([
        "FontName"=>'fonts/Forgotte.ttf',
        'FontSize'  =>  12
    ]);
    $mypicture->setGraphArea(0,0,count($data),max($data));
    $mypicture->Antialias = FALSE;
    $mypicture->drawScale();
    $mypicture->drawSplineChart();
    $mypicture->render('01.png');
//    $mypicture->autoOutput();
}
draw([
    7,4,8,7,8,45,1,1,6,9,6,54,4,3,5,4
]);